<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	xmlns:om="http://www.apusic.com/jsf/misc" renderKitId="AJAX" xmlns:epm="http://www.bp.com.cn/epm">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
		<!-- <script>
		 	//<![CDATA[
		 	function changeDepartment(jsvar){
		 		var selected=jsvar.getValue();
		 		var depShow=document.getElementById('depShow');
		 		if('PleaseSelect'==selected){
		 			depShow.style.display='block';
		 		}else{
		 			depShow.style.display='none';
		 		}
		 	}
		     //]]>
		 </script> -->
	</w:head>
	<w:page title="编辑机构">
		<layout:panel border="false" autoHeight="true" autoWidth="true" styleClass="k4-form">
			<w:form id="createDep" clientValidate="true">
				<layout:panel border="false" autoHeight="true" styleClass="k4-form-toolbar">
					<w:toolBar>
						<w:button label="保存" id="saveDepartmentalUnit"
							image="#{facesContext.externalContext.requestContextPath}/images/save.gif" />
						<w:separator />
						<w:button label="取消" id="addCancel" immediate="true"
							image="#{facesContext.externalContext.requestContextPath}/images/cancel.gif"
							onclick="javascript:closeCenterLayoutTab('editDepartmentalUnitTab')" />
					</w:toolBar>
				</layout:panel>
				<layout:panelGrid columns="2" cellpadding="0" cellspacing="0" border="1"
					styleClass="k4-form-grid">
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="部门编号" for="departmentCode" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:textField styleClass="k4-form-textfield" id="departmentCode" allowBlank="false"
							required="true" requiredTrim="true"></w:textField>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="部门名称" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:textField styleClass="k4-form-textfield" id="name" allowBlank="false" requiredTrim="true"
							required="true"></w:textField>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldtitle" id="depShow">
						<h:outputLabel value="上级部门" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<epm:deptSingleSelect idField="parentDepartmentalUnitId"></epm:deptSingleSelect>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="是否有效" for="enable" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:combo style="k4-form-modifield" id="enable" allowBlank="false"
							styleClass="k4-form-comofield" required="true">
						</w:combo>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="序列号" for="indexNumber" />
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue">
						<w:numberField styleClass="k4-form-textfield" id="indexNumber" allowBlank="false"
							required="true"></w:numberField>
					</layout:cell>
					<layout:cell style="display:none;">
						<h:inputText id="departmentalUnitId" style="display:none;"></h:inputText>
						<h:inputText id="centralUnitId" style="display:none;"></h:inputText>
					</layout:cell>
				</layout:panelGrid>
			</w:form>
		</layout:panel>
	</w:page>
</f:view>